package main

import "fmt"

func main() {
	ch1 := make(chan int, 1)
	ch1 <- 1
	ch2 := make(chan int, 1)
	ch2 <- 2
	select {
	case v := <- ch1:
		fmt.Println(v)
	case v := <- ch2:
		fmt.Println(v)
	default:
		fmt.Println(0)
	}
}